package com.cy.wangly.springcore.beanAutowired.impl;

import com.cy.wangly.springcore.beanAutowired.TestInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Service
@RequestMapping(value = "/testAutowiredOne", method = RequestMethod.GET)
public class TestAutowiredOne {
    @Autowired
    private TestInterface testInterface;

    public TestAutowiredOne() {
        System.out.println("init TestAutowiredOne");
    }

    @RequestMapping("/testAutowiredOne")
    public String getBeanName() {
        return testInterface.getBeanName();
    }
}
